import service from "@/utils/request";


export const getEqIDs = (regionCode: string) => {
    return service({
        url: `/equipment/equipment/get/ids?regionCode=${regionCode}`,
        method: 'GET'
    })
};


export const EquipmentScreen = (regionCode: string, type: string) => {
    return service({
        url: `/equipment/screen/equipment/tree/${regionCode}/${type}?category=Equipment`,
        method: 'GET'
    })
};
// 通用查数据接口
export const NewGeneral = (data: any) => {
    return service({
        url: `/equipment/screen/batch-exec-data-sql`,
        method: 'POST',
        data
    })
}


export const getRtsp = (id: any) => {
    return service({
        url: `/equipment/equipment/get/video?id=${id}`,
        method: 'GET'
    })
}

// 获取广播设备
export const getbroadcastConfig = (data: any) => {
    return service({
        url: '/equipment/broadcastConfig/page',
        method: 'POST',
        data
    })
}


// 执行网关控制
export const executeGatewayControl = (id: any, data: any) => {
    return service.post(`/equipment/control/${id}/execute`, data)
}

export const getEqControlItem = (id: any) => {
    return service.get(`/equipment/control/items?equipmentId=${id}`)
}



// ai识别告警类型分析
export const getAiTypeList = (data?: any) => {
    return service.post('/monitor/dashboard/djc/ai/type/analyse', data)
  }